<%@ page language="java" isELIgnored="false"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/ResourceGlobal.jsp"%>
<html>

<head>
<!-- 这里引入导航信息header.tpl -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="<%=context%>resources/modules/system/sys/institution/institution.create.js?r=<%=Math.random()%>"></script>
<script type="text/javascript">
	var INSTITUTION_PATH = "<%=context%>sys/institution/";
</script>
</head>

<body class="sub-page">
	<title>新增机构信息</title>

	<!-- 机构信息新建模态窗 -->
	<form id="institutionAddForm" role="form" class="form-horizontal"
		method="get"
		action="<%=context%>sys/institution/saveInstitutionInfo.do">
		<!-- 如果将表单禁用，就给fieldset添加disabled属性 -->
		<fieldset>

			<div class="page-content">
				<div class="page-header">
					<h4 class="page-title">新增机构信息</h4>
				</div>
				<div class="page-body">
					<div class="form-group">
						<label class="col-sm-2 control-label">机构简称<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入机构简称" class="form-control" name="instSName" id="instSName" value="" />
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">机构全称<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入机构全称" class="form-control" name="instLName" id="instLName" value="" />
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">机构层级<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<select name="instLevel" id="instLevel" class="form-control use-select2">
								<option></option>
							    <wasp:dictOptions dctRootType="INST_LEVEL"></wasp:dictOptions>
							</select>							
						</div>
					</div>
					
					<div class="form-group"  id="isShow" style="display: none;">
						<label class="col-sm-2 control-label">父级机构<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<select name="instParentId" id="instParentId" class="form-control use-select2" placeholder="父级机构">
							</select>							
						</div>
					</div>	
					
					<div class="form-group">
						<label class="col-sm-2 control-label">机构类型<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<select name="instType" id="instType" class="form-control use-select2">
							    <option value=""></option>
			               		<wasp:dictOptions dctRootType="IST_XXX_TYP"></wasp:dictOptions>							
							</select>							
						</div>
					</div>	
					<div class="form-group">
						<label class="col-sm-2 control-label">角色</label>
						<div class="col-sm-10 form-inner">
							<div>
								<c:forEach items="${instRolList }" var="instRol">   
				            	   <label><input class="i-checks" type="checkbox" name="instRolType" id="instRol${instRol.dctValue }" value="${instRol.dctValue }"  />${instRol.dctName }</label>
				            	</c:forEach>
							</div>
						</div>
					</div>			
				</div>
				<div class="page-footer">
				    <button type="button" class="btn btn-primary btn-save btn-loading btn-w-xs" data-loading-text="<i class='ico-loading'></i>" onclick="submitInstitutionAddForm();" id="submitbtn" name="submitbtn">提交</button>						
					<button type="button" id="cancelbtn" name="cancelbtn" class="btn btn-link btn-w-xs"  onclick="window.close();"  >取消</button>									
				</div>
			</div>
		</fieldset>
	</form>
</body>